import { Grid } from "@arco-design/web-react";
import type { PropsWithChildren, ReactNode } from "react";
import { SeContext, type SeContextType } from "./context";

type SeContainerProps = PropsWithChildren<
	SeContextType & {
		gutter?: number;
	}
>;

export default function SeContainer({
	children,
	gutter = 32,
	col,
	labelWidth,
}: SeContainerProps): ReactNode {
	return (
		<SeContext.Provider value={{ col, labelWidth }}>
			<Grid.Row gutter={gutter}>{children}</Grid.Row>
		</SeContext.Provider>
	);
}
